<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
	+ path + "/";
%>
<!DOCTYPE>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="<%=path%>/static/default.css">
<script type="text/javascript" src="<%=path%>/static/jquery-2.0.3.min.js"></script>
<title>SSM Demo</title>
</head>
<body>
	<h1>This SSM demo login page</h1>
	<form action="login" method="post">
		<table border="1" cellpadding="5px" cellspacing="0px">
			<tr>
				<td>账号：<input type="text" name="username" tabindex="1" /></td>
			</tr>
			<tr>
				<td>密码：<input type="password" name="password" maxLength="20" tabindex="2"></td>
			</tr>
			<tr>
				<td>
					<input type="text" placeholder="请输入验证码" name="captcha" id="captcha" maxlength="4" />
					<img id="codeimg" src="<%=basePath%>captcha.jpg" alt="验证码" />
					<p>
						<a href="javascript:getcode();" title="看不清，换一张">看不清，换一张</a>
					</p>
				</td>
			</tr>
			<tr>
				<td>
					<c:if test="${not empty message}">${message}</c:if>
				</td>
			</tr>
			<tr>
				<td><input type="submit" tabindex="4" value="登录" /></td>
			</tr>
			<tr></tr>
		</table>
	</form>
</body>
<script>
		function getcode(){
			$('#codeimg').attr("src","<%=basePath%>captcha.jpg?"+new Date());
		}
</script>
</html>